﻿@{
    ViewData["Title"] = "让 .NET 开发更简单，更通用，更流行";
}

@section Styles {
    <style type="text/css">
        .furion-im
        {
            width: 800px;
            height: 600px;
            box-shadow: 0 0 15px rgba(0,0,0,0.4);
            position: absolute;
            left: 50%;
            top: 50%;
            margin-left: -400px;
            margin-top: -300px;
            border: 1px solid #dedede;
            display: flex;
            overflow: hidden;
        }

        .furion-list
        {
            width: 200px;
            border-right: 1px solid #bbb;
            display: flex;
            flex-direction: column;
        }

        .furion-users
        {
            flex: 1;
            overflow-y: auto;
        }

        .furion-container
        {
            flex: 1;
            display: flex;
            flex-direction: column;
            position: relative;
        }

        .furion-messages
        {
            flex: 1;
            overflow-y: auto;
            padding: 10px;
            box-sizing: border-box;
        }

        .furion-textarea
        {
            height: 150px;
            border: none;
            border-top: 1px solid #bbb;
            resize: none;
            outline: none;
            box-sizing: border-box;
            line-height: 24px;
            padding: 10px;
            font-size: 14px;
        }

        #send
        {
            position: absolute;
            outline: none;
            border: none;
            padding: 6px 25px;
            background: #b200ff;
            color: #fff;
            position: absolute;
            bottom: 10px;
            right: 10px;
            z-index: 2;
            cursor: pointer;
            font-weight: bold;
        }

            #send:hover
            {
                opacity: 0.8;
            }

        .furion-list-item
        {
            display: flex;
            justify-content: flex-start;
            align-items: center;
            box-sizing: border-box;
            padding: 5px 10px;
            cursor: pointer;
        }

            .furion-list-item:hover
            {
                background: #dedede;
            }

        .furion-list-label
        {
            flex: 1;
        }

        .furion-list-picture
        {
            height: 36px;
            width: 36px;
            border-radius: 50%;
            color: #fff;
            background: #ff6a00;
            margin-right: 10px;
            text-align: center;
            line-height: 36px;
        }

        .furion-messages-item
        {
            display: flex;
            padding: 10px 0;
        }

        .furion-message-content
        {
            flex: 1;
        }

        .furion-messages-picture
        {
            height: 36px;
            width: 36px;
            border-radius: 50%;
            color: #fff;
            background: #ff6a00;
            margin-right: 10px;
            text-align: center;
            line-height: 36px;
        }

        .furion-messages-label
        {
            font-size: 12px;
            padding-left: 0;
        }

        .furion-messages-msg
        {
            font-size: 13px;
            padding: 5px 10px;
            line-height: 24px;
            border-radius: 4px;
            background: #eee;
            display: inline-block;
            margin-top: 5px;
        }

        .furion-messages-item.send
        {
            flex-direction: row-reverse;
        }

            .furion-messages-item.send .furion-messages-picture
            {
                margin-right: 0;
                margin-left: 10px;
            }

            .furion-messages-item.send .furion-message-content
            {
                text-align: right;
            }

        .furion-system-msg
        {
            margin: 10px auto;
            text-align: center;
        }

            .furion-system-msg > div
            {
                display: inline-block;
                font-size: 12px;
                background: #dedede;
                padding: 3px 10px;
            }

        .furion-title
        {
            font-size: 16px;
            text-align: center;
            padding: 10px 10px;
            font-weight: bold;
            background: #eee;
        }

        #myname
        {
            position: absolute;
            outline: none;
            border: none;
            padding: 6px;
            position: absolute;
            bottom: 10px;
            right: 100px;
            width: 100px;
            z-index: 2;
            border: 1px solid #bbb;
        }
    </style>
}

<div class="furion-im">
    <div class="furion-list">
        <div class="furion-title">聊天列表</div>
        <div class="furion-users">
            <div class="furion-list-item">
                <div class="furion-list-picture">百</div>
                <div class="furion-list-label">百小僧</div>
            </div>
            <div class="furion-list-item">
                <div class="furion-list-picture" style="background:#ff006e;">F</div>
                <div class="furion-list-label">Furion</div>
            </div>
            <div class="furion-list-item">
                <div class="furion-list-picture" style="background:#00ffff;">D</div>
                <div class="furion-list-label">dotNET China</div>
            </div>
        </div>
    </div>
    <div class="furion-container">
        <div class="furion-title">dotNET China ① 群</div>
        <div class="furion-messages" id="msgs">
        </div>
        <textarea class="furion-textarea" id="input-message" placeholder="说点什么呗..."></textarea>
        <input type="text" placeholder="何许人也？" id="myname" value="Furion" />
        <button id="send">发 送</button>
    </div>
</div>

@section Scripts{
    <script src="~/vendors/signalr/signalr.min.js"></script>
    <script src="~/scripts/chat.js"></script>
}